package cuit.epoch.pymjl.security.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName t_shop
 */
@TableName(value ="t_shop")
@Data
public class TShop implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 姓名
     */
    private String username;

    /*
    * 用户昵称
    * */
    private String usernickname;
    /**
     * 商品名
     */
    private String shopname;
    /*
    * 商品所在学院
    * */
    private String campus;
    /*
    * 详细联系地址
    * */
    private String fulladdress;
    /*
    * 商品所在校区
    * */
    private String academy;
    /**
     * 用户微信id
     */
    private String wxid;

    /**
     * 用户手机号码
     */
    private String phomenumber;

    /**
     * 商品介绍
     */
    private String shoptext;

    /*
    * 信息是否已读
    * */
    private Integer messageyesorno;
    /**
     * 基本信息
     */
    private String shopbi;

    /**
     * 商品价格
     */
    private String price;

    /**
     * 商品数量
     */
    private String quantity;

    /**
     * 管理员审核商品是否
     */
    private Integer audit;

    /**
     * 备注
     */
    private String remark;

    /**
     * 照片地址01
     */
    private String shopimg;

    /**
     * 照片地址02
     */
    private String shopimg02;

    /**
     * 照片地址03
     */
    private String shopimg03;
    /*
    * 商品状态（上架或审批中）
    * */
    private String shopstate;
    /*
    * 商品更新时间
    * */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date timeupdate;

    private Integer itemstatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    public Integer getId() {
        return id;
    }

    /**
     * id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 姓名
     */
    public String getUsername() {
        return username;
    }

    /**
     * 姓名
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 商品名
     */
    public String getShopname() {
        return shopname;
    }

    /**
     * 商品名
     */
    public void setShopname(String shopname) {
        this.shopname = shopname;
    }

    /**
     * 用户微信id
     */
    public String getWxid() {
        return wxid;
    }

    /**
     * 用户微信id
     */
    public void setWxid(String wxid) {
        this.wxid = wxid;
    }

    /**
     * 用户手机号码
     */
    public String getPhomenumber() {
        return phomenumber;
    }

    /**
     * 用户手机号码
     */
    public void setPhomenumber(String phomenumber) {
        this.phomenumber = phomenumber;
    }

    /**
     * 商品介绍
     */
    public String getShoptext() {
        return shoptext;
    }

    /**
     * 商品介绍
     */
    public void setShoptext(String shoptext) {
        this.shoptext = shoptext;
    }

    /**
     * 基本信息
     */
    public String getShopbi() {
        return shopbi;
    }

    /**
     * 基本信息
     */
    public void setShopbi(String shopbi) {
        this.shopbi = shopbi;
    }

    /**
     * 商品价格
     */
    public String getPrice() {
        return price;
    }

    /**
     * 商品价格
     */
    public void setPrice(String price) {
        this.price = price;
    }

    /**
     * 商品数量
     */
    public String getQuantity() {
        return quantity;
    }

    /**
     * 商品数量
     */
    public void setQuantity(String quantity) {
        this.quantity = quantity;
    }

    /**
     * 管理员审核商品是否
     */
    public Integer getAudit() {
        return audit;
    }

    /**
     * 管理员审核商品是否
     */
    public void setAudit(Integer audit) {
        this.audit = audit;
    }

    /**
     * 备注
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 备注
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getShopimg() {
        return shopimg;
    }

    public void setShopimg(String shopimg) {
        this.shopimg = shopimg;
    }

    public String getShopimg02() {
        return shopimg02;
    }

    public void setShopimg02(String shopimg02) {
        this.shopimg02 = shopimg02;
    }

    public String getShopimg03() {
        return shopimg03;
    }

    public void setShopimg03(String shopimg03) {
        this.shopimg03 = shopimg03;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TShop other = (TShop) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getShopname() == null ? other.getShopname() == null : this.getShopname().equals(other.getShopname()))
            && (this.getWxid() == null ? other.getWxid() == null : this.getWxid().equals(other.getWxid()))
            && (this.getPhomenumber() == null ? other.getPhomenumber() == null : this.getPhomenumber().equals(other.getPhomenumber()))
            && (this.getShoptext() == null ? other.getShoptext() == null : this.getShoptext().equals(other.getShoptext()))
            && (this.getShopbi() == null ? other.getShopbi() == null : this.getShopbi().equals(other.getShopbi()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
            && (this.getAudit() == null ? other.getAudit() == null : this.getAudit().equals(other.getAudit()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getShopname() == null) ? 0 : getShopname().hashCode());
        result = prime * result + ((getWxid() == null) ? 0 : getWxid().hashCode());
        result = prime * result + ((getPhomenumber() == null) ? 0 : getPhomenumber().hashCode());
        result = prime * result + ((getShoptext() == null) ? 0 : getShoptext().hashCode());
        result = prime * result + ((getShopbi() == null) ? 0 : getShopbi().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getAudit() == null) ? 0 : getAudit().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", shopname=").append(shopname);
        sb.append(", wxid=").append(wxid);
        sb.append(", phomenumber=").append(phomenumber);
        sb.append(", shoptext=").append(shoptext);
        sb.append(", shopbi=").append(shopbi);
        sb.append(", price=").append(price);
        sb.append(", quantity=").append(quantity);
        sb.append(", audit=").append(audit);
        sb.append(", remark=").append(remark);
        sb.append(", shopimg=").append(shopimg);
        sb.append(", shopimg02=").append(shopimg02);
        sb.append(", shopimg03=").append(shopimg03);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
